<?php

require_once('../includes/SmartyManager.class.php');
require_once('../includes/DB.class.php');


$smarty = SmartyManager::getSmarty();

$stypes = array(
		'certificationNumber' => '产品质量证明书号',
		'filename' => '上传时的文件名',
		'filestat' => '物流状况',
		'mainStat' => '订货清单质量证书状态'
		);
if(isset($_GET['stype']) && in_array($_GET['stype'], array_keys($stypes))){
	if($_GET['stype'] == 'certificationNumber'){
		$smarty->assign('simple', false);
		$smarty->assign('filestat', false);
	}else if($_GET['stype'] == 'filestat'){
		$smarty->assign('filestat', true);
	}else if($_GET['stype'] == 'mainStat'){
		$smarty->assign('mainStat', true);
	}
	else{
		$smarty->assign('simple', true);
	}

	$smarty->assign($_GET['stype'].'Check', true);
	$smarty->assign('stype', $_GET['stype']);
	$smarty->assign('keyname', isset($_GET['keyname'])?$_GET['keyname']:"");
	$smarty->assign('searchType', ' 按'.$stypes[$_GET['stype']]).'查询的结果：';
	$smarty->display('main.html');
	die();
}else{
	$errMsg = '还未支持当前这个查询';
	$smarty->assign('errTitle', '搜索出现个小问题');
	$smarty->assign('errMsg', $errMsg);
	$smarty->display('error.html');
	die();
}

?>